<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>给组件绑定原生事件</title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<child @click="handleClick"></child><!-- 无法正常绑定handleClick()事件-->
			<child @click.native="handleClick"></child><!-- 正常绑定handleClick()事件-->
		</div>
		<script type="text/javascript">
		Vue.component('child',{
			template:'<div @click="handleChildClick">Child</div>',
			methods:{
				/* handleChildClick:function(){
					alert('child click')
				} */
			}
		})
			var vm = new Vue({
				el:'#app',
				methods:{
					handleClick:function(){
						alert('chick');
					}
				}
			});
		</script>
	</body>
</html>
